<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统1</title>
</head>

<body>
    <div>系统1</div>
    <script>
        // 登录后回来会带token
        const token = location.search.split("=")[1];
        if (!token) {
            // 传递应用id
            fetch(`http://localhost:7001/sso/login?appId=6gJGBl2Fqy&redirect_url=${location.href}`).then(res => {
                location.href = res.url;
            })
        } else {
            sessionStorage.setItem("token", token)
            // 核实token信息
        }
    </script>
</body>

</html>